var zhanghao = document.querySelector("#zhanghao");
//var zhanghao = prompt("dsfdsfsdf");
if (zhanghao.indexOf("@")!=-1 && zhanghao.indexOf(".")>zhanghao.indexOf("@")){
    alert("这是个邮箱");
}else {
    alert("这不是个邮箱");
}